package com.chapter6;

/**
 * 装饰者模式
 */
public class PersonTest {
    public static void main(String[] args) {
        Person xc = new Person("小菜");
        System.out.println("第一种装扮：");

        BigTrouser bigTrouser = new BigTrouser();
        Sneaker sneaker = new Sneaker();
        TShirts tShirts = new TShirts();

        bigTrouser.Decorate(xc);
        sneaker.Decorate(bigTrouser);
        tShirts.Decorate(sneaker);
        tShirts.show();
    }
}
